<tr>
	<?php
	$id_album = $this->uri->segment(3,0);
//	echo $id_album;
//	$this->load->database();
//	$query = $this->db->query("select * from images where id_album='$id_album'");
	$loop = 0;
	foreach ($query->result() as $row):
		if(($row->thumbs=="") || ($row->thumbs==false)){
			$row->thumbs = site_url("images/nopicture.jpg");
		} else {
			$row->thumbs = site_url(array('project','loadThumbs',$row->id_images));
		}
	$loop++;
		if($loop % 5==1){
				echo "</tr><tr>";
			}
//			echo $row->id_album;
	?>
	
	 <td width="140" align="center" valign="top">
	 <a href="<?php echo site_url(array('project','openImages',$row->id_album,$row->id_images))?>">
	 <img class="picture" src="<?php echo $row->thumbs ?>" /></a>
	<br />
	 <a href="<?php echo site_url(array('project','openImages',$row->id_album,$row->id_images))?>">
	 <?php echo $row->name ?></a>
	<br /><br />
	</td>
	<?php endforeach ?> 
</tr>
